import request from '@/axios';

export const getUserPage = (current, size, params) => {
  const cryptoData = JSON.stringify(params);
  return request({
    url: '/biz/search/user',
    method: 'post',
    params: {
      current,
      size
    },
    data: { cryptoData: cryptoData },
    cryptoToken: true,
    cryptoData: true
  });
};

export const getUserDetail = (id) => {
  return request({
    url: '/biz/search/user/detail',
    method: 'post',
    data: { id: id },
    cryptoToken: true,
    cryptoData: true
  });
};

export const getDict = (code) => {
  return request({
    url: '/biz/search/dictionary/dict',
    method: 'post',
    data: { code: code },
    cryptoToken: true,
    cryptoData: true
  });
};

export const getDictBiz = (code) => {
  return request({
    url: '/biz/search/dictionary/dict-biz',
    method: 'post',
    data: { code: code },
    cryptoToken: true,
    cryptoData: true
  });
};

export const getSelectSmsApi = () => {
  return request({
    url: '/biz/search/select/sms-api',
    method: 'post',
    cryptoToken: true,
    cryptoData: true
  });
};

export const getSelectCountry = () => {
  return request({
    url: '/biz/search/select/country',
    method: 'post',
    cryptoToken: true,
    cryptoData: true
  });
};

export const getSelectProxyPlatform = () => {
  return request({
    url: '/biz/search/select/proxy-platform',
    method: 'post',
    cryptoToken: true,
    cryptoData: true
  });
};

export const getSelectMappingCountry = (serviceApiId, serviceConfigId) => {
  return request({
    url: '/biz/search/select/mapping-country',
    method: 'post',
    data: { serviceApiId: serviceApiId, serviceConfigId: serviceConfigId },
    cryptoToken: true,
    cryptoData: true
  });
};

export const getSelectTaskProxyPlatform = () => {
  return request({
    url: '/biz/search/select/task-proxy-platform',
    method: 'post',
    cryptoToken: true,
    cryptoData: true
  });
};

export const getSelectSmsOperator = () => {
  return request({
    url: '/biz/search/select/sms-operator',
    method: 'post',
    cryptoToken: true,
    cryptoData: true
  });
};

